home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 August / ENTER.ISO / files / gimp-2.0.5-i586-setup.exe / {app} / share / gimp / 2.0 / scripts / swirltile.scm < prev    next >
Encoding:
GIMP Script-Fu Script  |  2004-09-26  |  2.1 KB  |  57 lines

  1. ;
  2. ; Swirl-tile
  3. ;  produces a (hope-fully) seamlessly tiling swirling effect
  4. ;
  5. ;  Adrian Likins  <aklikins@eos.ncsu.edu>
  6. ;
  7. ;  http://www4.ncsu.edu/eos/users/a/aklikins/pub/gimp/
  8. ;
  9.  
  10.  
  11. (define (script-fu-swirl-tile depth azimuth elevation blurRadius height width whirl-amount noise-level bg-color)
  12.   (let* ((img (car (gimp-image-new width height RGB)))
  13.      (layer-one (car (gimp-layer-new img width height
  14.                      RGB-IMAGE "TEST" 100 NORMAL-MODE)))
  15.      (cx (/ width 2))
  16.      (cy (/ height 2))
  17.      (old-bg (car (gimp-palette-get-background))))
  18.     (gimp-image-undo-disable img)
  19.     (gimp-palette-set-background bg-color)
  20.     (gimp-edit-fill layer-one BACKGROUND-FILL)
  21.     (gimp-image-add-layer img layer-one 0)
  22.     (plug-in-noisify 1 img layer-one FALSE noise-level noise-level noise-level 1.0)
  23.  
  24.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  25.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  26.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  27.  
  28.     (gimp-drawable-offset layer-one TRUE 0 cx cy)
  29.  
  30.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  31.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  32.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  33.  
  34.     (plug-in-gauss-rle 1 img layer-one blurRadius TRUE TRUE)
  35.  
  36.     (plug-in-bump-map 1 img layer-one layer-one azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
  37.  
  38.     (gimp-display-new img)
  39.     (gimp-image-undo-enable img)))
  40.  
  41. (script-fu-register "script-fu-swirl-tile"
  42.             _"<Toolbox>/Xtns/Script-Fu/Patterns/Swirl-_Tile..."
  43.             "Create an interesting swirled tile"
  44.             "Adrian Likins <aklikins@eos.ncsu.edu>"
  45.             "Adrian Likins"
  46.             "1997"
  47.             ""
  48.             SF-ADJUSTMENT _"Depth" '(10 0 64 1 1 0 0)
  49.             SF-ADJUSTMENT _"Azimuth" '(135 0 360 1 10 0 0)
  50.             SF-ADJUSTMENT _"Elevation" '(45 0 90 1 10 0 0)
  51.             SF-ADJUSTMENT _"Blur Radius" '(3 0 128 1 10 0 0)
  52.             SF-ADJUSTMENT _"Height" '(256 0 1024 1 10 0 1)
  53.             SF-ADJUSTMENT _"Width" '(256 0 1024 1 10 0 1)
  54.             SF-ADJUSTMENT _"Whirl Amount" '(320 0 360 1 10 0 0)
  55.             SF-ADJUSTMENT _"Roughness" '(.5 0 1 .1 .01 2 1)
  56.             SF-COLOR      _"Background Color" '(255 255 255))
  57.